/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.group4.highschoolportal.teacher.backingBeans;



import com.group4.entity.Teacher;
import com.group4.highschoolportal.loginBean.IndexBackingBean;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Victor Cernea
 */
@ManagedBean
@SessionScoped
public class TeacherBackingBean implements Serializable {

    private Teacher teacher;

    /** Creates a new instance of StudentBackingBean */
    public TeacherBackingBean() {
        HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
        teacher = (Teacher) session.getAttribute("user");

    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }
}
